document.getElementById('add-todo-btn').addEventListener('click', function() {
    var todoInput = document.getElementById('todo-input');
    var todoList = document.getElementById('todo-list');
    var todoText = todoInput.value;
  
    if (todoText) {
      var newTodo = document.createElement('li');
      newTodo.textContent = todoText;
      todoList.appendChild(newTodo);
      todoInput.value = '';
    }
  });